package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectWagesEntityMapper;
import com.ly.heart.domain.ProjectWagesEntity;
import com.ly.heart.service.IProjectWagesEntityService;

/**
 * 项目人力工资明细Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectWagesEntityServiceImpl implements IProjectWagesEntityService
{
    @Autowired
    private ProjectWagesEntityMapper projectWagesEntityMapper;

    /**
     * 查询项目人力工资明细
     *
     * @param id 项目人力工资明细主键
     * @return 项目人力工资明细
     */
    @Override
    public ProjectWagesEntity selectProjectWagesEntityById(String id)
    {
        return projectWagesEntityMapper.selectProjectWagesEntityById(id);
    }

    /**
     * 查询项目人力工资明细列表
     *
     * @param projectWagesEntity 项目人力工资明细
     * @return 项目人力工资明细
     */
    @Override
    public List<ProjectWagesEntity> selectProjectWagesEntityList(ProjectWagesEntity projectWagesEntity)
    {
        return projectWagesEntityMapper.selectProjectWagesEntityList(projectWagesEntity);
    }

    /**
     * 新增项目人力工资明细
     *
     * @param projectWagesEntity 项目人力工资明细
     * @return 结果
     */
    @Override
    public int insertProjectWagesEntity(ProjectWagesEntity projectWagesEntity)
    {
        projectWagesEntity.setCreateTime(DateUtils.getNowDate());
        return projectWagesEntityMapper.insertProjectWagesEntity(projectWagesEntity);
    }

    /**
     * 修改项目人力工资明细
     *
     * @param projectWagesEntity 项目人力工资明细
     * @return 结果
     */
    @Override
    public int updateProjectWagesEntity(ProjectWagesEntity projectWagesEntity)
    {
        return projectWagesEntityMapper.updateProjectWagesEntity(projectWagesEntity);
    }

    /**
     * 批量删除项目人力工资明细
     *
     * @param ids 需要删除的项目人力工资明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectWagesEntityByIds(String[] ids)
    {
        return projectWagesEntityMapper.deleteProjectWagesEntityByIds(ids);
    }

    /**
     * 删除项目人力工资明细信息
     *
     * @param id 项目人力工资明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectWagesEntityById(String id)
    {
        return projectWagesEntityMapper.deleteProjectWagesEntityById(id);
    }
}
